/**
 * 
 */
package edu.arizona.bio5.onto.decomposition;

/**
 * Java bean for storing AD statistics
 * 
 * @author pklinov
 *
 */
public class ADStats {

	protected int m_atoms = 0;
	protected int m_biggestAtomSize = 0;
	protected double m_avgAtom = 0;
	protected int m_maxPISizeInAtoms = 0;
	protected int m_maxPISizeInAxioms = 0;
	protected double m_avgPISizeInAtoms = 0;
	protected double m_avgPISizeInAxioms = 0;
	protected Atom m_biggestAtom = null;
	protected int m_ccNum = 0;
	protected int m_totalNumOfAxioms = 0;
	
	public int getM_totalNumOfAxioms() {
		return m_totalNumOfAxioms;
	}
	public void setM_totalNumOfAxioms(int m_totalNumOfAxioms) {
		this.m_totalNumOfAxioms = m_totalNumOfAxioms;
	}
	public int getAtoms() {
		return m_atoms;
	}
	public void setAtoms(int atoms) {
		this.m_atoms = atoms;
	}
	public int getBiggestAtomSize() {
		return m_biggestAtomSize;
	}
	public void setBiggestAtomSize(int biggestAtom) {
		this.m_biggestAtomSize = biggestAtom;
	}
	public double getAvgAtomSize() {
		return m_avgAtom;
	}
	public void setAvgAtomSize(double avgAtom) {
		this.m_avgAtom = avgAtom;
	}

	
	public int getMaxPISizeInAtoms() {
		return m_maxPISizeInAtoms;
	}
	public void setMaxPISizeInAtoms(int m_maxPISizeInAtoms) {
		this.m_maxPISizeInAtoms = m_maxPISizeInAtoms;
	}
	public int getMaxPISizeInAxioms() {
		return m_maxPISizeInAxioms;
	}
	public void setMaxPISizeInAxioms(int m_maxPISizeInAxioms) {
		this.m_maxPISizeInAxioms = m_maxPISizeInAxioms;
	}
	public double getAvgPISizeInAtoms() {
		return m_avgPISizeInAtoms;
	}
	public void setAvgPISizeInAtoms(double m_avgPISizeInAtoms) {
		this.m_avgPISizeInAtoms = m_avgPISizeInAtoms;
	}
	public double getAvgPISizeInAxioms() {
		return m_avgPISizeInAxioms;
	}
	public void setAvgPISizeInAxioms(double m_avgPISizeInAxioms) {
		this.m_avgPISizeInAxioms = m_avgPISizeInAxioms;
	}
	
	public int getTotalNumberOfAxioms() {
		return m_totalNumOfAxioms;
	}
	public void setTotalNumberOfAxioms(int total) {
		this.m_totalNumOfAxioms = total;
	}	
	
	
	public void setBiggestAtom(Atom atom) {
		
		m_biggestAtom = atom;
	}
	
	public Atom getBiggestAtom() {
		
		return m_biggestAtom;
	}
	
	public void setConnectedComponentsNumber(int ccNum) {
		m_ccNum = ccNum;
	}
	
	public int getConnectedComponentsNumber() {
		return m_ccNum;
	}	
	
	@Override
	public String toString() {

		return 	"Number of atoms " + m_atoms + "\n" +
				"Biggest atom (" + m_biggestAtom.getID() + "): " + m_biggestAtomSize + " axioms\n" +
				"Average atom size: " + m_avgAtom + " axioms\n" + 
				"Max size of PI (atoms): " + m_maxPISizeInAtoms + " \n" +
				"Max size of PI (axioms): " + m_maxPISizeInAxioms + " \n" +
				"Avg size of PI (atoms): " + m_avgPISizeInAtoms + " \n" +
				"Avg size of PI (axioms): " + m_avgPISizeInAxioms + " \n" +				
				"Number of connected components: " + m_ccNum;
	}
	
	public String toCommaSeparatedString() {
		
		return 	m_totalNumOfAxioms + "," + m_atoms + "," + m_biggestAtomSize + "," + m_avgAtom + "," + m_maxPISizeInAtoms + "," + m_avgPISizeInAtoms + 
				"," + m_maxPISizeInAxioms + "," + m_avgPISizeInAxioms + "," + m_ccNum;
	}
	
	
}
